﻿<%@ Page Title="Car Insurance Feedback - GluayGluay" Language="C#" MasterPageFile="~/MasterPage.master"
    AutoEventWireup="true" Async="true" CodeFile="userfeedback.aspx.cs" Inherits="user_userfeedback"
    ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script src="/includes/ValidationError-NEW.js" type="text/javascript"></script>

    <script src="/includes/ValidationEffect-NEW.js" type="text/javascript"></script>

    <script src="/controls/CE_Date.js" type="text/javascript"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpHeader" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpBody" runat="Server">
    <%--<asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true" runat="server">
    </asp:ScriptManager>--%>
    <div class="body">
        <div class="top">
        </div>
        <div class="body">
            <div class="padding_lr15px">
                <!-- Column Content | Start -->
                <div class="col_content_full">
                    <div class="top">
                    </div>
                    <div class="body">
                        <div class="padding_lr30px">
                            <h1>
                                <%=GetGlobalResourceObject("UserMessage", "SendUsYourFeedback")%></h1>
                            <div class="seperator_15px">
                            </div>
                            <div id="CarForm">
                                <!-- Form | Start -->
                                <asp:ValidationSummary ID="vsUserFeedBack" runat="server" ValidationGroup="feedback"
                                    ShowSummary="True" HeaderText="<%$ Resources:Menu,RequiredValidation%>" CssClass="errorSummary" />
                                <asp:Label ID="lblMessage" runat="server"></asp:Label>
                                <div style="display: none;">
                                    <div class="form_col_1 left">
                                        <label>
                                            <%=GetGlobalResourceObject("UserMessage", "FeedbackTitle")%></label></div>
                                    <div class="form_col_2 left">
                                        <asp:TextBox ID="lblFeedBackTitle" runat="server" Text="<%$ Resources:UserMessage,Feedback%>"></asp:TextBox>
                                        <%--<asp:Label ID="lblFeedBackTitle" runat="server"><%=GetGlobalResourceObject("UserMessage", "Feedback")%></asp:Label>--%>
                                    </div>
                                </div>
                                <div>
                                    <div class="form_col_1 left">
                                        <div style="padding-top: 35px;">
                                            <%=GetGlobalResourceObject("UserMessage", "Whatyoufeel")%>                                            
                                            <div style="height: 28px;">
                                            </div>
                                            <%=GetGlobalResourceObject("UserMessage", "FeedbackType")%>                                            
                                        </div>
                                    </div>
                                    <div class="form_col_2 left">
                                        <table width="100%" cellpadding="2" cellspacing="2">
                                            <tr>
                                                <td style="width: 20%" align="center">
                                                    <asp:ImageButton ID="ibtnVeryUseful" runat="server" ToolTip="<%$ Resources:Title,VeryUseful%>"
                                                        ImageUrl="/images/icon/emotion/happy-icon.png" Width="75" Height="75" BorderStyle="none" OnClientClick="return ChangeImage('EV')" />
                                                </td>
                                                <td style="width: 20%" align="center">
                                                    <asp:ImageButton ID="ibtnGood" runat="server" ToolTip="<%$ Resources:Title,Good%>"
                                                        ImageUrl="/images/icon/emotion/smile-icon.png" Width="75" Height="75" BorderStyle="none" OnClientClick="return ChangeImage('EG')" />
                                                </td>
                                                <td style="width: 20%" align="center">
                                                    <asp:ImageButton ID="ibtnOk" runat="server" ToolTip="<%$ Resources:Title,OK%>" BorderStyle="none" ImageUrl="/images/icon/emotion/ok-icon.png"
                                                        Width="75" Height="75" OnClientClick="return ChangeImage('EO')" />
                                                </td>
                                                <td style="width: 20%" align="center">
                                                    <asp:ImageButton ID="ibtnSad" runat="server" ToolTip="<%$ Resources:Title,Sad%>"
                                                        ImageUrl="/images/icon/emotion/sad-icon.png" Width="75" Height="75" BorderStyle="none" OnClientClick="return ChangeImage('ES')" />
                                                </td>
                                                <td style="width: 20%" align="center">
                                                    <asp:ImageButton ID="ibtnAngry" runat="server" ToolTip="<%$ Resources:Title,Angry%>"
                                                        ImageUrl="/images/icon/emotion/angry-icon.png" Width="75" Height="75" BorderStyle="none" OnClientClick="return ChangeImage('EA')" />
                                                </td>
                                            </tr>
                                            <div style="display: none;">
                                                <asp:TextBox ID="txtEmotionType" runat="server"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="rfvEmotionType" ValidationGroup="feedback" validationErrorCssClass="validationError"
                                                    runat="server" ErrorMessage="<%$ Resources:UserMessage,WhatyoufeelMessage%>"
                                                    ControlToValidate="txtEmotionType"></asp:RequiredFieldValidator>
                                            </div>
                                            <tr>
                                                <td colspan="5">
                                                    <asp:ImageButton ID="ibtnSuggestion" runat="server" ToolTip="<%$ Resources:Title,Suggestion%>"
                                                        ImageUrl="/images/icon/emotion/button_suggestion.png" BorderStyle="none" OnClientClick="return ChangeImage('BS')"
                                                        Style="width: 114px; height: 27px;" />
                                                    <asp:ImageButton ID="ibtnCompliment" runat="server" ToolTip="<%$ Resources:Title,Compliment%>"
                                                        ImageUrl="/images/icon/emotion/button_compliment.png" BorderStyle="none" OnClientClick="return ChangeImage('BC')"
                                                        Style="width: 114px; height: 27px;" />
                                                    <asp:ImageButton ID="ibtnBug" runat="server" ToolTip="<%$ Resources:Title,Bug%>"
                                                        ImageUrl="/images/icon/emotion/button_bug.png" BorderStyle="none" OnClientClick="return ChangeImage('BB')"
                                                        Style="width: 114px; height: 27px;" />
                                                </td>
                                            </tr>
                                            <div style="display: none;">
                                                <asp:TextBox ID="txtFeedbackType" runat="server"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="rfvFeedbackType" ValidationGroup="feedback" validationErrorCssClass="validationError"
                                                    runat="server" ErrorMessage="<%$ Resources:UserMessage,FeedbackTypeMessage%>" ControlToValidate="txtFeedbackType"></asp:RequiredFieldValidator>
                                            </div>
                                        </table>
                                    </div>
                                    <div style="display: none;">
                                        <%--<asp:TextBox ID="txtEmotionType" runat="server" Text="0"></asp:TextBox>
                                        <asp:TextBox ID="txtFeedbackType" runat="server" Text="0"></asp:TextBox>--%>
                                    </div>
                                </div>
                            </div>
                            <div class="seperator_form">
                            </div>
                            <div>
                                <div class="form_col_1 comp left">
                                    <asp:Label ID="lblYourName" runat="server" Text="<%$ Resources:UserMessage,YourName%>" /></div>
                                <div class="form_col_2 left">
                                    <asp:TextBox ID="txtName" MaxLength="50" class="text" runat="server" Width="200px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvName" runat="server" CssClass="validationErrorControl"
                                        ValidationGroup="feedback" ErrorMessage="" Text="" ControlToValidate="txtName"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revName" runat="server" ValidationGroup="feedback"
                                        ValidationExpression="^[a-zA-Z''-'\s]{1,50}$" CssClass="validationErrorControl"
                                        ControlToValidate="txtName" ErrorMessage=""></asp:RegularExpressionValidator>
                                </div>
                            </div>
                            <div class="seperator_form">
                            </div>
                            <div>
                                <div class="form_col_1 comp left">
                                    <asp:Label ID="lblEmail" runat="server" Text="<%$ Resources:UserMessage,YourEmail%>" /></div>
                                <div class="form_col_2 left">
                                    <asp:TextBox ID="txtEmail" Enabled="True" runat="server" Width="250px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ValidationGroup="feedback" CssClass="validationErrorControl"
                                        ID="rfvEmail" runat="server" ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage=""></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ValidationGroup="feedback" CssClass="validationErrorControl"
                                        ID="revEmail" runat="server" ControlToValidate="txtEmail" ErrorMessage="" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                </div>
                            </div>
                            <div class="seperator_form">
                            </div>
                            <div>
                                <div class="form_col_1 comp left">
                                    <asp:Label ID="lblYourFeedback" runat="server" Text="<%$ Resources:UserMessage,YourFeedback%>" /></div>
                                <div class="form_col_2 left">
                                    <asp:TextBox ID="txtFeedBack" Width="350px" Enabled="true" runat="server" Columns="61"
                                        MaxLength="500" Rows="7" TextMode="MultiLine"></asp:TextBox>
                                    <div id="divThankYou" visible="false" runat="server">
                                        <asp:Label runat="server" Font-Size="Smaller" ForeColor="DarkBlue" ID="lblThankYou"><%=GetGlobalResourceObject("UserMessage", "FeedbackThankyou")%></asp:Label>
                                    </div>
                                    <asp:RequiredFieldValidator ValidationGroup="feedback" CssClass="validationErrorControl"
                                        ID="rfvFeedback" runat="server" ErrorMessage="" ControlToValidate="txtFeedBack"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                            <div class="seperator_form">
                            </div>
                            <div class="seperator_15px">
                            </div>
                            <div>
                                <asp:Button ID="btnSendFeedBack" onmousedown="this.className = 'button_submit_mousedown';"
                                    onmouseup="this.className = 'button_submit';" onmouseout="this.className = 'button_submit';"
                                    CssClass="button_submit" OnClientClick="LoadValidationErrorCss();if (Page_ClientValidate('feedback')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'button_processing';}"
                                    runat="server" ValidationGroup="feedback" AlternateText="Submit" ToolTip="Submit"
                                    OnClick="btnSendFeedBack_Click" />
                            </div>
                            <!-- Form | End   -->
                        </div>
                    </div>
                    <div class="bottom">
                    </div>
                </div>
            </div>
            <!-- Column Content | End   -->
            <!--------------CONTENT HERE -------------->
            <!-- Column Right | Start  
                <div>
                    <div class="col_right-white">
                        <div class="top">
                        </div>
                        <div class="body text_center">
                            <div class="tip">
                                <asp:Image ID="Image1" runat="server" ImageUrl="<%$Resources:ImageResource,PaymentBannerUrl%>"
                                    Width="234" Height="188" AlternateText="Payment" />
                            </div>
                        </div>
                        <div class="bottom">
                        </div>
                    </div>
                    <div class="seperator_15px">
                    </div>
                    <div class="seperator_15px">
                    </div>
                </div>
                Column Right | End   -->
        </div>
    </div>
    <div class="bottom">
    </div>

    <script type="text/javascript">
        function ChangeImage(btnName) {

            var txtET = document.getElementById('<%=txtEmotionType.ClientID%>');
            var txtFT = document.getElementById('<%=txtFeedbackType.ClientID%>');

            var imgBS = document.getElementById('<%=ibtnSuggestion.ClientID%>');
            var imgBC = document.getElementById('<%=ibtnCompliment.ClientID%>');
            var imgBB = document.getElementById('<%=ibtnBug.ClientID%>');

            var imgEV = document.getElementById('<%=ibtnVeryUseful.ClientID%>');
            var imgEG = document.getElementById('<%=ibtnGood.ClientID%>');
            var imgEO = document.getElementById('<%=ibtnOk.ClientID%>');
            var imgES = document.getElementById('<%=ibtnSad.ClientID%>');
            var imgEA = document.getElementById('<%=ibtnAngry.ClientID%>');

            if (btnName == "BS") {
                txtFT.value = "1";
                imgBS.src = '/images/icon/emotion/button_suggestion_s.png';
                imgBC.src = '/images/icon/emotion/button_compliment.png';
                imgBB.src = '/images/icon/emotion/button_bug.png';
            }
            else if (btnName == "BC") {
                txtFT.value = "2";
                imgBS.src = '/images/icon/emotion/button_suggestion.png';
                imgBC.src = '/images/icon/emotion/button_compliment_s.png';
                imgBB.src = '/images/icon/emotion/button_bug.png';
            }
            else if (btnName == "BB") {
                txtFT.value = "3";
                imgBS.src = '/images/icon/emotion/button_suggestion.png';
                imgBC.src = '/images/icon/emotion/button_compliment.png';
                imgBB.src = '/images/icon/emotion/button_bug_s.png';
            }
            else if (btnName == "EV") {
                txtET.value = "1";
                imgEV.src = '/images/icon/emotion/happy-icon_s.png';
                imgEG.src = '/images/icon/emotion/smile-icon.png';
                imgEO.src = '/images/icon/emotion/ok-icon.png';
                imgES.src = '/images/icon/emotion/sad-icon.png';
                imgEA.src = '/images/icon/emotion/angry-icon.png';
            }
            else if (btnName == "EG") {
                txtET.value = "2";
                imgEV.src = '/images/icon/emotion/happy-icon.png';
                imgEG.src = '/images/icon/emotion/smile-icon_s.png';
                imgEO.src = '/images/icon/emotion/ok-icon.png';
                imgES.src = '/images/icon/emotion/sad-icon.png';
                imgEA.src = '/images/icon/emotion/angry-icon.png';
            }
            else if (btnName == "EO") {
                txtET.value = "3";
                imgEV.src = '/images/icon/emotion/happy-icon.png';
                imgEG.src = '/images/icon/emotion/smile-icon.png';
                imgEO.src = '/images/icon/emotion/ok-icon_s.png';
                imgES.src = '/images/icon/emotion/sad-icon.png';
                imgEA.src = '/images/icon/emotion/angry-icon.png';
            }
            else if (btnName == "ES") {
                txtET.value = "4";
                imgEV.src = '/images/icon/emotion/happy-icon.png';
                imgEG.src = '/images/icon/emotion/smile-icon.png';
                imgEO.src = '/images/icon/emotion/ok-icon.png';
                imgES.src = '/images/icon/emotion/sad-icon_s.png';
                imgEA.src = '/images/icon/emotion/angry-icon.png';
            }
            else if (btnName == "EA") {
                txtET.value = "5";
                imgEV.src = '/images/icon/emotion/happy-icon.png';
                imgEG.src = '/images/icon/emotion/smile-icon.png';
                imgEO.src = '/images/icon/emotion/ok-icon.png';
                imgES.src = '/images/icon/emotion/sad-icon.png';
                imgEA.src = '/images/icon/emotion/angry-icon_s.png';
            }
            else {
                txtET.value = "";
                txtFT.value = "";

                imgBS.src = '/images/icon/emotion/button_suggestion.png';
                imgBC.src = '/images/icon/emotion/button_compliment.png';
                imgBB.src = '/images/icon/emotion/button_bug.png';

                imgEV.src = '/images/icon/emotion/happy-icon.png';
                imgEG.src = '/images/icon/emotion/smile-icon.png';
                imgEO.src = '/images/icon/emotion/ok-icon.png';
                imgES.src = '/images/icon/emotion/sad-icon.png';
                imgEA.src = '/images/icon/emotion/angry-icon.png';
            }
            return false;
        } 
    </script>

</asp:Content>
